#!/usr/bin/python

import ConfigParser 
import os
import sys
from threading import Thread

# this should run many clients at the same time with the server and copy a lot of files

client_folder = "./client/"
client_name = "client_vladimir"
server_port = "2223"
cmd = ['r','s'] 
mode = ['a','p']
f = "93796_.zip" 


def do_client( i):
	
	log = "./log/client_" + str(i) 	
	run_client_cmd = client_folder   + client_name + " 127.0.0.1:" + server_port + " " + cmd[0] +" " + \
					mode[0] + " " + f + " " + log 
	os.system(run_client_cmd)
	print "Finish" + str(i)


client_num = 10

for i in range(client_num):
	t = Thread(target = do_client, args = (i,))
	print "Start " + str(i)
	t.start()	
	





